<?php

use yii\db\Migration;

/**
 * Handles the creation of table `package_transfer_history`.
 */
class m170913_073805_create_package_transfer_history_table extends Migration
{
    /**
     * @inheritdoc
     * 资产包转让记录表
     */
    public function up()
    {
        $this->createTable('package_transfer_history', [
            'id' => $this->bigPrimaryKey(),
            'package_id' => $this->bigInteger()->notNull()->comment('资产包ID'),
            'transfer_date' => $this->string()->notNull()->comment('转让日期'),
            'transfer' => $this->string()->notNull()->comment('转让/处置方'),
            'content' => $this->text()->notNull()->comment('转让/处置内容'),
            'remark' => $this->text()->notNull()->comment('备注'),
            'order' => $this->bigInteger()->notNull()->comment('序号'),
            'created_at'=>$this->timestamp(),
        ]);
    }

    /**
     * @inheritdoc
     */
    public function down()
    {
        $this->dropTable('package_transfer_history');
    }
}
